
package com.lck.blogmanager.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * @author wyq
 * @version v1.0.0
 * @explain
 * @date 2024/4/7 13:49
 */
@Getter
@Setter
@ToString
@Accessors(chain = true)
@TableName("blog_comment")
public class BlogCommentEntity {

    /**
     * id
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    /**
     * 博客id
     */
    private Integer blogId;

    /**
     * 用户id
     */
    private Integer userId;

    /**
     * 对象用户id
     */
    private Integer targetId;

    /**
     * 评论内容
     */
    private String body;


    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

}
